﻿<Window 
	x:Class="DemoApp.MainWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:vm="clr-namespace:DemoApp.ViewModel"
	xmlns:vw="clr-namespace:DemoApp.View"
	xmlns:g="http://schemas.galador.net/xaml/libraries"
	FontSize="13" 
	FontFamily="Verdana"
	MinWidth="650" MinHeight="420"
	Title="{Binding DisplayName}"
	Width="700" Height="480"
	WindowStartupLocation="CenterScreen"
	g:Composition.DesignerDataContext="vm:MainWindowViewModel"
	>
	<Control.Resources>
		<ResourceDictionary Source="MainWindowResources.xaml" />
	</Control.Resources>

	<DockPanel>
		<DockPanel DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None">
			<Menu KeyboardNavigation.TabNavigation="Cycle">
				<MenuItem Header="_File">
					<MenuItem Header="E_xit" Command="{Binding Path=CloseCommand}" />
				</MenuItem>
				<MenuItem Header="_Edit" />
				<MenuItem Header="_Options" />
				<MenuItem Header="_Help" />
			</Menu>
		</DockPanel>

		<Grid Margin="4">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="4" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>

			<Border 
				Grid.Column="0" 
				Style="{StaticResource MainBorderStyle}"
				Width="170"
				>
				<HeaderedContentControl
				  Content="{Binding Path=Commands}"
				  ContentTemplate="{StaticResource CommandsTemplate}"
				  Header="Control Panel"
				  Style="{StaticResource MainHCCStyle}"
				  />
			</Border>

			<Border
				Grid.Column="2" 
				Style="{StaticResource MainBorderStyle}"
				>
				<HeaderedContentControl 
					Header="Workspaces"
					Style="{StaticResource MainHCCStyle}"
					>
					<TabControl 
						IsSynchronizedWithCurrentItem="True" 
						ItemsSource="{Binding Workspaces}" 
						ItemContainerStyle="{StaticResource ClosableTabItemStyle}"
						Margin="4"
						/>
				</HeaderedContentControl>
			</Border>
		</Grid>
	</DockPanel>
</Window>